package com.gg.star.controller;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;

import com.gg.povos.FruitStarPovo;
import com.gg.star.service.StarService;

import base.BaseServlet;

@WebServlet("/star/ShowStarsByUidServlet")
public class ShowStarsByUidServlet extends BaseServlet {
	@Autowired
	private   StarService  starService;
	
	
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String  uid =  request.getParameter("uid");
		
		List<FruitStarPovo>   povos =starService.getStarsByUid(uid);
		
		request.getSession().setAttribute("starpovos", povos);
		
		response.sendRedirect("/fruits/showstar.jsp");
		
		
	}

	

}
